package com.itheima.kebian;

import java.util.*;

public class Demo02 {

    public static void main(String[] args) {
        //有缺陷
        Map.of(1,"1",2,"2");

        Map.Entry<String, String> entry1 = Map.entry("宝强", "马蓉");
        Map.Entry<String, String> entry2 = Map.entry("宋喆", "马蓉");
        Map.Entry<String, String> entry3 = Map.entry("乃亮", "小璐");
        Map.Entry<String, String> entry4 = Map.entry("PGone", "小璐");

        //
        Map<String, String> map = Map.ofEntries(entry1, entry2, entry3, entry4);


     /*   map.put("签签","小嘟");*/
        HashMap<String, String> map2 = new HashMap<>(map);
        map2.put("签签","小嘟");
        System.out.println(map2);

        HashSet<String> set = new HashSet<>(List.of("坤坤","坤坤", "签签", "滔滔", "鹿鹿"));
        System.out.println(set);

    }
}
